<html>
<head><meta charset="utf-8"><title>min-const-generics experience: writing parallel-hashlife-4 · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/min-const-generics.20experience.3A.20writing.20parallel-hashlife-4.html">min-const-generics experience: writing parallel-hashlife-4</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223272052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/min-const-generics%20experience%3A%20writing%20parallel-hashlife-4/near/223272052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/min-const-generics.20experience.3A.20writing.20parallel-hashlife-4.html#223272052">(Jan 19 2021 at 18:37)</a>:</h4>
<p>In case anyone finds this interesting, min-const-generics has worked out well for me when writing a rayon-parallelized arbitrary-dimension hashlife implementation: <a href="https://github.com/programmerjake/parallel-hashlife-4">https://github.com/programmerjake/parallel-hashlife-4</a></p>
<p>My main complaint is that rust-analyzer won't autocomplete a const-generic that's in scope:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">impl</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">CONST</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="n">MyTrait</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">MyType</span><span class="o">&lt;</span><span class="n">CONST</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">AssociatedType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MyType2</span><span class="o">&lt;</span><span class="n">CO</span><span class="o">|&gt;</span><span class="p">;</span><span class="w"> </span><span class="c1">// rust-analyzer refuses to auto-complete CONST at the |</span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="223276825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/min-const-generics%20experience%3A%20writing%20parallel-hashlife-4/near/223276825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/min-const-generics.20experience.3A.20writing.20parallel-hashlife-4.html#223276825">(Jan 19 2021 at 19:08)</a>:</h4>
<p>(indirectly) ask and you shall receive <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7351">https://github.com/rust-analyzer/rust-analyzer/pull/7351</a></p>



<a name="223278106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/min-const-generics%20experience%3A%20writing%20parallel-hashlife-4/near/223278106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/min-const-generics.20experience.3A.20writing.20parallel-hashlife-4.html#223278106">(Jan 19 2021 at 19:16)</a>:</h4>
<p><span class="user-mention" data-user-id="300586">@Lukas Wirth</span> Thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>